{
  "swagger": "2.0",
  "info": {
    "version": "1.0.0",
    "title": "Swagger Petstore",
    "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "name": "Swagger API Team"
    },
    "license": {
      "name": "MIT"
    }
  },
  "host": "petstore.swagger.io",
  "basePath": "/api",
  "schemes": ["http"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "paths": {},
  "definitions": {
    "SimpleDiscriminator": {
      "discriminator": {
        "propertyName": "objectType"
      },
      "oneOf": [
        {
          "$ref": "#/components/schemas/simpleObject"
        },
        {
          "$ref": "#/components/schemas/complexObject"
        }
      ]
    },
    "simpleObject": {
      "type": "object",
      "required": [
        "objectType"
      ],
      "properties": {
        "objectType": {
          "type": "string"
        }
      }
    },
    "complexObject": {
      "type": "object",
      "required": [
        "objectType"
      ],
      "properties": {
        "objectType": {
          "type": "string"
        }
      }
    },
    "BlockDTOEnum": {
      "enum": ["csv", "file", "kek"]
    },
    "BlockDTOWithEnum": {
      "required": [
        "title",
        "type"
      ],
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "nullable": false
        },
        "type": {
          "$ref": "#/components/schemas/BlockDTOEnum"
        }
      },
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "csv": "#/components/schemas/CsvBlockWithEnumDTO",
          "file": "#/components/schemas/FileBlockWithEnumDTO"
        }
      },
      "oneOf": [
        {
          "$ref": "#/components/schemas/CsvBlockWithEnumDTO"
        },
        {
          "$ref": "#/components/schemas/FileBlockWithEnumDTO"
        }
      ]
    },
    "CsvBlockWithEnumDTO": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BlockDTOWithEnum"
        },
        {
          "required": [
            "text",
            "type"
          ],
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "csv",
              "enum": [
                "csv"
              ]
            },
            "text": {
              "type": "string",
              "nullable": false
            }
          }
        }
      ]
    },
    "FileBlockWithEnumDTO": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BlockDTOWithEnum"
        },
        {
          "required": [
            "fileId",
            "type"
          ],
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "file",
              "enum": [
                "file"
              ]
            },
            "fileId": {
              "type": "string",
              "nullable": false
            }
          }
        }
      ]
    },
    "BlockDTO": {
      "required": [
        "title"
      ],
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "nullable": false
        }
      },
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "csv": "#/components/schemas/CsvBlockDTO",
          "file": "#/components/schemas/FileBlockDTO"
        }
      },
      "oneOf": [
        {
          "$ref": "#/components/schemas/CsvBlockDTO"
        },
        {
          "$ref": "#/components/schemas/FileBlockDTO"
        }
      ]
    },
    "CsvBlockDTO": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BlockDTO"
        },
        {
          "required": [
            "text",
            "type"
          ],
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "csv",
              "enum": [
                "csv"
              ]
            },
            "text": {
              "type": "string",
              "nullable": false
            }
          }
        }
      ]
    },
    "FileBlockDTO": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BlockDTO"
        },
        {
          "required": [
            "fileId",
            "type"
          ],
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "file",
              "enum": [
                "file"
              ]
            },
            "fileId": {
              "type": "string",
              "nullable": false
            }
          }
        }
      ]
    },
    "Pet": {
      "type": "object",
      "required": [
        "pet_type"
      ],
      "properties": {
        "pet_type": {
          "type": "string"
        }
      },
      "discriminator": {
        "propertyName": "pet_type",
        "mapping": {
          "dog": "#/components/schemas/Dog",
          "cat": "#/components/schemas/Cat",
          "lizard": "#/components/schemas/Lizard"
        }
      }
    },
    "PetOnlyDiscriminator": {
      "discriminator": {
        "propertyName": "pet_type",
        "mapping": {
          "dog": "#/components/schemas/Dog",
          "cat": "#/components/schemas/Cat",
          "lizard": "#/components/schemas/Lizard"
        }
      }
    },
    "Cat": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Pet"
        },
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          }
        }
      ]
    },
    "Dog": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Pet"
        },
        {
          "type": "object",
          "properties": {
            "bark": {
              "type": "string"
            }
          }
        }
      ]
    },
    "Lizard": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Pet"
        },
        {
          "type": "object",
          "properties": {
            "lovesRocks": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "PetEnum": {
      "enum": ["dog", "lizard", "cat"]
    },
    "PetWithEnum": {
      "type": "object",
      "required": [
        "pet_type"
      ],
      "properties": {
        "pet_type": {
          "$ref": "#/components/schemas/PetEnum"
        }
      },
      "discriminator": {
        "propertyName": "pet_type",
        "mapping": {
          "dog": "#/components/schemas/DogWithEnum",
          "cat": "#/components/schemas/CatWithEnum",
          "lizard": "#/components/schemas/LizardWithEnum"
        }
      }
    },
    "CatWithEnum": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PetWithEnum"
        },
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            }
          }
        }
      ]
    },
    "DogWithEnum": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PetWithEnum"
        },
        {
          "type": "object",
          "properties": {
            "bark": {
              "type": "string"
            }
          }
        }
      ]
    },
    "LizardWithEnum": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PetWithEnum"
        },
        {
          "type": "object",
          "properties": {
            "lovesRocks": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "InvalidDiscriminatorPropertyName": {
      "type": "object",
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "num": {
            "type": "number"
          },
          "str": {
            "type": "string"
          }
        }
      }
    },
    "Variant": {
      "description": "kek pek",
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "update": "#/components/schemas/VariantUpdate",
          "undo": "#/components/schemas/VariantUndo",
          "rollback": "#/components/schemas/VariantRollback",
          "scale": "#/components/schemas/VariantScale",
          "resources": "#/components/schemas/VariantResources",
          "firewall": "#/components/schemas/VariantFirewall",
          "gateway": "#/components/schemas/VariantGateway"
        }
      },
      "oneOf": [
        {
          "$ref": "#/components/schemas/VariantUpdate"
        },
        {
          "$ref": "#/components/schemas/VariantUndo"
        },
        {
          "$ref": "#/components/schemas/VariantRollback"
        },
        {
          "$ref": "#/components/schemas/VariantScale"
        },
        {
          "$ref": "#/components/schemas/VariantResources"
        },
        {
          "$ref": "#/components/schemas/VariantFirewall"
        },
        {
          "$ref": "#/components/schemas/VariantGateway"
        }
      ]
    },
    "VariantFirewall": {
      "type": "object",
      "description": "Proposal to change firewall rules for deployment.",
      "properties": {
        "rules_added": {
          "type": "array",
          "description": "asdasdasdasdasdsad added to deployment. If not set, no rules are added.\n",
          "items": {
            "type": "string"
          }
        },
        "rules_removed": {
          "type": "array",
          "description": "asdasdasdasdasdsad removed from deployment. If not set, no rules were removed.\n",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "VariantScale": {
      "type": "object",
      "description": "asdasdasdasdasd",
      "required": [
        "replicas"
      ],
      "properties": {
        "replicas": {
          "type": "integer",
          "description": "asdasdasdasdasdsad",
          "example": 3
        }
      }
    },
    "VariantResources": {
      "type": "object",
      "description": "asdasdasdasdasd",
      "required": [
        "resources"
      ],
      "properties": {
        "resources": {
          "type": "string"
        }
      }
    },
    "VariantGateway": {
      "type": "object",
      "description": "asdasdasdasdasd",
      "properties": {
        "port": {
          "type": "string",
          "description": "asdasdasdasdasdsad"
        },
        "name": {
          "type": "string",
          "description": "asdasdasdasdasdsad"
        },
        "domain": {
          "type": "string",
          "description": "asdasdasdasdasdsad"
        }
      }
    },
    "VariantUpdate": {
      "type": "object",
      "description": "Pasdasdasdasdasd."
    },
    "VariantRollback": {
      "type": "object",
      "description": "asdasdasdasdasd",
      "required": [
        "revision_id"
      ],
      "properties": {
        "revision_id": {
          "type": "integer",
          "description": "asdasdasdasdasdsad",
          "example": 42
        }
      }
    },
    "VariantUndo": {
      "type": "object",
      "description": "asdasdasdasdasdn"
    }
  }
}
